home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / msoftapp.zip / SPLITTER.CPP < prev    next >
C/C++ Source or Header  |  1993-06-01  |  2KB  |  71 lines

  1. // splitter.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "circle.h"
  6. #include "circldoc.h"
  7. #include "circlvw.h"
  8. #include "textview.h"
  9. #include "splitter.h"
  10.  
  11. #ifdef _DEBUG
  12. #undef THIS_FILE
  13. static char BASED_CODE THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CSplitterFrameWnd
  18.  
  19. IMPLEMENT_DYNCREATE(CSplitterFrameWnd, CMDIChildWnd)
  20.  
  21. CSplitterFrameWnd::CSplitterFrameWnd()
  22. {
  23. }
  24.  
  25. CSplitterFrameWnd::~CSplitterFrameWnd()
  26. {
  27. }
  28.  
  29.     
  30. BOOL CSplitterFrameWnd::OnCreateClient(LPCREATESTRUCT, CCreateContext* pContext)
  31.     {
  32.     // create a splitter with 1 row, 2 columns
  33.     if (!m_wndSplitter.CreateStatic(this, 1, 2))
  34.         {
  35.         TRACE("Failed to CreateStatic Splitter\n");
  36.         return FALSE;
  37.         }
  38.  
  39.     // add the first splitter pane - the default view in column 0
  40.     if (!m_wndSplitter.CreateView(0, 0,
  41.         pContext->m_pNewViewClass, CSize(130, 50), pContext))
  42.         {
  43.         TRACE("Failed to create first pane\n");
  44.         return FALSE;
  45.         }
  46.  
  47.     // add the second splitter pane - a text view in column 1
  48.     if (!m_wndSplitter.CreateView(0, 1,
  49.         RUNTIME_CLASS(CTextView), CSize(0, 0), pContext))
  50.         {
  51.         TRACE("Failed to create second pane\n");
  52.         return FALSE;
  53.         }
  54.  
  55.     // activate the input view
  56.     SetActiveView((CView*)m_wndSplitter.GetPane(0,1));
  57.  
  58.     return TRUE;
  59.     }
  60.  
  61.  
  62. BEGIN_MESSAGE_MAP(CSplitterFrameWnd, CMDIChildWnd)
  63.     //{{AFX_MSG_MAP(CSplitterFrameWnd)
  64.         // NOTE - the ClassWizard will add and remove mapping macros here.
  65.     //}}AFX_MSG_MAP
  66. END_MESSAGE_MAP()
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CSplitterFrameWnd message handlers
  70.  
  71.